-- GENERATED SPELL FOR [Ambassador Hellmaw] --


function spell0_18731(pUnit, Event) --@Banish,Self--
pUnit:FullCastSpellOnTarget(30231,pUnit)
pUnit:RegisterEvent('Sorts_18731', 777, 1)
end

function spell1_18731(pUnit, Event) --@Corrosive Acid,Self--
pUnit:FullCastSpellOnTarget(33551,pUnit)
pUnit:RegisterEvent('Sorts_18731', 17000, 1)
end

function spell2_18731(pUnit, Event) --@Fear,Self--
pUnit:FullCastSpellOnTarget(33547,pUnit)
pUnit:RegisterEvent('Sorts_18731', 6445, 1)
end

function Sorts_18731(pUnit, Event)
local choix_sorts_18731 = math.random(0, 2)
if choix_sorts_18731 == 0 then
pUnit:RegisterEvent('spell0_18731', 1, 1)
end
if choix_sorts_18731 == 1 then
pUnit:RegisterEvent('spell1_18731', 1, 1)
end
if choix_sorts_18731 == 2 then
pUnit:RegisterEvent('spell2_18731', 1, 1)
end
end

function mob18731_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18731', math.random(1500, 3000), 1)
end

function mob18731_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18731_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18731_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18731, 1, 'mob18731_Action')
RegisterUnitEvent(18731, 2, 'mob18731_Leave')
RegisterUnitEvent(18731, 3, 'mob18731_Kill')
RegisterUnitEvent(18731, 4, 'mob18731_Die')
